home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / util / wb / huntwin1_4.lha / huntwindows.s < prev   
Text File  |  1992-11-22  |  15KB  |  707 lines

  1.             output    work:huntwindows
  2.  
  3.             ;no includes - i use them all preassembled!
  4.  
  5.             ;.... nearly all ....
  6.  
  7.             incdir    "sys:devpac/include/"
  8.             include "workbench/startup.i"
  9.             include "workbench/workbench.i"
  10.     
  11. ;WHERE ARE THE INCLUDES FOR THIS??????
  12. _LVOFreeDiskObject    = -90
  13. _LVOGetDiskObject    = -78
  14. _LVOFindToolType    = -96
  15.  
  16.             ;Some helpful macros
  17. CALL            macro
  18.             jsr    _LVO\1(a6)
  19.             endm
  20. Push            macro
  21.             movem.l    \1,-(sp)
  22.             endm
  23. Pull            macro
  24.             movem.l    (sp)+,\1
  25.             endm
  26. RSave            macro
  27.             movem.l    a0-a6/d0-d7,-(sp)
  28.             endm
  29. RLoad            macro
  30.             movem.l    (sp)+,a0-a6/d0-d7
  31.             endm
  32.  
  33.         ;Bits for Arguments
  34. ArgMove            equ    0
  35. ArgFront        equ    1
  36. ArgQuit            equ    2
  37. ArgAlways        equ    3
  38. ArgWBOnly        equ    4
  39. ArgWFront        equ    5
  40. ArgPDef            equ    6
  41.  
  42.         ;Bits for Communication
  43. SignalWindow        equ    0
  44. SignalScreen        equ    1
  45.  
  46.             move.l    $04,a6
  47.             lea    DosName(pc),a1
  48.             moveq.l    #36,d0        ;2.0 Only
  49.             CALL    OpenLibrary    
  50.             move.l    d0,DosBase
  51.             beq    Error2
  52.  
  53.             move.l    ThisTask(a6),a1
  54.             tst.l    pr_CLI(a1)
  55.             bne    CliStart
  56.             lea    pr_MsgPort(a1),a2
  57.             move.l    a2,a0
  58.             CALL    WaitPort
  59.             move.l    a2,a0
  60.             CALL    GetMsg
  61.             move.l    d0,WBMessage
  62.             move.l    d0,a3
  63.         
  64.             move.l    $04,a6
  65.             lea    IconName(pc),a1
  66.             moveq.l    #33,d0
  67.             CALL    OpenLibrary
  68.             move.l    d0,IconBase
  69.             beq    Error2
  70.  
  71.             move.l    sm_ArgList(a3),d0
  72.             beq.s    SkipReadArgs
  73.             move.l    d0,a0
  74.             move.l    a0,-(sp)
  75.             move.l    wa_Lock(a0),d1
  76.             move.l    DosBase,a6
  77.             CALL    CurrentDir
  78.             move.l    (sp)+,a0
  79.  
  80.             move.l    IconBase,a6
  81.             move.l    wa_Name(a0),a0
  82.             CALL    GetDiskObject
  83.             move.l    d0,DObject
  84.             beq    Error2
  85.  
  86.             lea    WBTemplate(pc),a3
  87.             lea    $0300,a4
  88.  
  89.             move.l    d0,a0
  90.             move.l    do_ToolTypes(a0),a0
  91.             
  92. GetEmLoop        move.l    (a3)+,a1
  93.             move.l    a1,d0
  94.             beq.s    SkipReadArgs
  95.             move.l    a0,-(sp)
  96.             CALL    FindToolType
  97.             move.l    (sp)+,a0
  98.             move.l    (a3)+,a2
  99.             move.l    d0,(a2)
  100.             move.l    d0,(a4)+
  101.             bra.s    GetEmLoop
  102.  
  103. CliStart        move.l    DosBase,a6
  104.  
  105.             move.l    #Template,d1
  106.             move.l    #TemplateArray,d2
  107.             moveq.l    #0,d3
  108.             CALL    ReadArgs    ;Get options
  109.             tst.l    d0
  110.             beq    Error3
  111.             move.l    d0,Args
  112.  
  113. SkipReadArgs        move.l    DosBase,a6
  114.             CALL    Output
  115.             move.l    d0,d6        ;Remember for all outputs
  116.  
  117.             move.l    $04,a6
  118.             lea    intuition(pc),a1
  119.             moveq.l    #36,d0
  120.             CALL    OpenLibrary
  121.             move.l    d0,IntBase
  122.             beq    Error2
  123.             lea    GraphicsName(pc),a1
  124.             moveq.l    #36,d0
  125.             CALL    OpenLibrary
  126.             move.l    d0,GfxBasis
  127.             beq    Error2
  128.  
  129.             tst.l    TempNoMove        ;Set the Bits according
  130.             beq.s    NoSet1            ;to the parameters given
  131.             bset    #ArgMove,ArgFlag
  132. NoSet1            tst.l    TempNoFront
  133.             beq.s    NoSet2
  134.             bset    #ArgFront,ArgFlag
  135. NoSet2            tst.l    TempQuit
  136.             beq.s    NoSet3
  137.             bset    #ArgQuit,ArgFlag
  138.  
  139. NoSet3            bclr    #ArgAlways,ArgFlag
  140.             tst.l    TempAlways
  141.             beq.s    NoAlways
  142.             bset    #ArgAlways,ArgFlag
  143.  
  144. NoAlways        tst.l    TempHADJ
  145.             beq.s    NoSet4
  146.             move.l    TempHADJ,a0
  147.             move.b    (a0),d0
  148.             or.b    #$20,d0
  149.             move.b    d0,SecondFlag
  150.  
  151. NoSet4            tst.l    TempVADJ
  152.             beq.s    NoSet5
  153.             move.l    TempVADJ,a0
  154.             move.b    (a0),d0
  155.             or.b    #$20,d0
  156.             move.b    d0,SecondFlag+1
  157.  
  158. NoSet5            tst.l    TempWBOnly
  159.             beq.s    NoSet6
  160.             bset    #ArgWBOnly,ArgFlag
  161.  
  162. NoSet6            tst.l    TempWFront
  163.             beq.s    NoSet7
  164.             bset    #ArgWFront,ArgFlag
  165.  
  166. NoSet7            tst.l    TempPDef
  167.             beq.s    NoSet8
  168.             bset    #ArgPDef,ArgFlag
  169.  
  170. NoSet8            move.l    $04,a6
  171.             CALL    Forbid            ;Have a look if we are
  172.             lea    PortName(pc),a1        ;already running
  173.             CALL    FindPort        
  174.             tst.l    d0
  175.             beq    FirstInstall
  176.             move.l    d0,a3
  177.             move.l    #MEMF_CLEAR!MEMF_PUBLIC,d1
  178.             move.l    #MN_SIZE+4,d0        ;Memory for the message
  179.             CALL    AllocMem
  180.             move.l    d0,a1
  181.             tst.l    d0
  182.             beq    QuitPrg
  183.             move.w    ArgFlag,MN_SIZE(a1)
  184.             move.w    SecondFlag,(MN_SIZE+2)(a1)
  185.             move.l    a3,a0
  186.             move.b    #PA_SIGNAL,MP_FLAGS(a0)    ;Necessary, but why like this?
  187.             CALL    PutMsg            ;Send message
  188.             CALL    Permit
  189.             bra    ErrorPort
  190.  
  191. FirstInstall        btst    #ArgQuit,ArgFlag    ;Quitting without being
  192.             bne    QuitPrg            ;installed means nothing
  193.             CALL    CreateMsgPort
  194.             move.l    d0,MyPort
  195.             move.l    d0,a1
  196.             CALL    Permit
  197.             move.l    #PortName,LN_NAME(a1)
  198.             CALL    AddPort            ;Rendevousport
  199.             move.l    MyPort,a0
  200.             moveq.l    #0,d0
  201.             move.b    MP_SIGBIT(a0),d0
  202.             move.l    SignalMask,d1        ;Enter signal into
  203.             bset    d0,d1            ;mask for waiting
  204.             move.l    d1,SignalMask
  205.  
  206.             lea    Texth(pc),a0        ;Print out who we are
  207.             bsr    PrintText
  208.  
  209.             move.l    $04,a6            ;Build interrupt-server
  210.  
  211.             sub.l    a1,a1
  212.             jsr    _LVOFindTask(a6)
  213.             move.l    d0,OwnTask
  214.  
  215.                     moveq   #-1,d0            ;A Signal for telling
  216.                     jsr     _LVOAllocSignal(a6)    ;our task that sth happened
  217.                     tst.l   d0
  218.                     bmi     Error2
  219.                     move.l  d0,Signal
  220.             move.l    SignalMask,d1
  221.                     bset    d0,d1
  222.                     move.l    d1,SignalMask
  223.  
  224.             lea    MyInterrupt(pc),a1
  225.             move.l    #Interrupt3,IS_CODE(a1)
  226.             clr.l    IS_DATA(a1)
  227.             move.b    #NT_INTERRUPT,LN_TYPE(a1)
  228.             move.b    #0,LN_PRI(a1)
  229.             move.l    #HandlerName,LN_NAME(a1)
  230.             move.l    #5,d0    ;INTB_VERTB
  231.             jsr    _LVOAddIntServer(a6)
  232.  
  233. WaitOn            move.l    $04,a6
  234.             move.l    SignalMask,d0        ;Wait for Port and Break
  235.             CALL    Wait
  236.             btst    #SIGBREAKB_CTRL_C,d0    ;This means quit
  237.             bne    QuitPrg
  238.             move.l    Signal,d1
  239.             btst    d1,d0            ;Signal from Interrupt?
  240.             beq.s    TryNextMsg
  241.  
  242.             move.l    IntBase,a0
  243.             btst    #SignalWindow,What
  244.             beq.s    NoWindowStuff
  245.             
  246.             move.l    ib_ActiveWindow(a0),a0
  247.             bsr    DoYourJob
  248.             bclr    #SignalWindow,What
  249.  
  250. NoWindowStuff        btst    #SignalScreen,What
  251.             beq.s    TryNextMsg
  252.             move.l    IntBase,a0
  253.             move.l    ib_FirstScreen(a0),a0
  254.             bsr    AdjustScreen
  255.             bclr    #SignalScreen,What
  256.  
  257. TryNextMsg        move.l    MyPort,a0        ;Get the message awaiting
  258.             CALL    GetMsg
  259.             tst.l    d0
  260.             bne.s    GotMsg
  261.             bra.s    WaitOn
  262.  
  263. GotMsg            move.l    d0,a1
  264.             move.w    MN_SIZE(a1),ArgFlag
  265.             move.w    (MN_SIZE+2)(a1),SecondFlag
  266.             move.l    #MN_SIZE+4,d0
  267.             CALL    FreeMem            ;Replying is much to
  268.             btst    #ArgQuit,ArgFlag    ;complicated - lets just free
  269.             bne.s    QuitPrg
  270.             bra    TryNextMsg
  271.  
  272. ErrorPort        lea    TextP(pc),a0        ;Tell the user we passed
  273.             bsr    PrintText        ;the arguments to a 
  274.             bra.s    QuitPrg            ;running version
  275.  
  276. Error3            lea    Text1(pc),a0        ;Seems there is an error
  277.             bsr    PrintText        ;in the given arguments
  278.             bra.s    QuitPrg
  279.  
  280. Error2            lea    Text2(pc),a0        ;Tell the user something
  281.             bsr    PrintText        ;went wrong with the libs
  282.             bra.s    QuitPrg
  283.  
  284. QuitPrg            move.l    $04,a6    
  285.             CALL    Permit
  286.             move.l    #5,d0
  287.             lea    MyInterrupt(pc),a1
  288.             tst.l    IS_CODE(a1)
  289.             beq.s    NoHandler
  290.             CALL    RemIntServer        ;Remove the Interrupt-Server
  291.  
  292. NoHandler        move.l    Signal,d0        ;Free the signal
  293.             beq.s    DontFreeS
  294.                     CALL    FreeSignal
  295.  
  296. DontFreeS        tst.l    Args
  297.             beq.s    HmmNoArgs
  298.             move.l    DosBase,a6
  299.             move.l    Args,d1
  300.             CALL    FreeArgs
  301.  
  302. HmmNoArgs        move.l    $04,a6
  303.             move.l    MyPort,d0
  304.             beq.s    NoPort
  305.             move.l    d0,a1            ;Remove the message port
  306.             CALL    RemPort
  307.             move.l    MyPort,a0
  308.             CALL    DeleteMsgPort        ;and free it
  309.  
  310. NoPort            tst.l    IntBase            ;Close librarys
  311.             beq.s    ErrorX2
  312.             move.l    IntBase,a1
  313.             CALL    CloseLibrary
  314. ErrorX2            tst.l    GfxBasis
  315.             beq.s    Error
  316.             move.l    GfxBasis,a1
  317.             CALL    CloseLibrary
  318.  
  319. Error            move.l    $0004.w,a6
  320.             tst.l    WBMessage
  321.             beq.s    NoWB
  322.             move.l    WBMessage,a1
  323.             CALL    ReplyMsg
  324.  
  325. NoWB            
  326.             move.l    IconBase,a6
  327.             move.l    DObject,a0
  328.             move.l    a0,d0
  329.             beq.s    SkipFD
  330.             CALL    FreeDiskObject
  331. SkipFD            move.l    $04,a6
  332.             move.l    IconBase,d0
  333.             beq.s    NoIconLib
  334.             move.l    d0,a1
  335.             CALL    CloseLibrary
  336.             
  337. NoIconLib        move.l    DosBase,a1
  338.             CALL    CloseLibrary
  339.             moveq.l    #0,d0
  340.             rts
  341.  
  342.             ;Subroutine to print a text to stdout
  343. PrintText        Push    d0-d4/a0-a1/a6
  344.             move.l    a0,a1
  345.             moveq.l    #0,d0
  346. TestLen            tst.b    (a1)+
  347.             beq.s    LaengeOk
  348.             addq    #1,d0
  349.             bra.s    TestLen
  350. LaengeOk        move.l    DosBase,a6
  351.             move.l    d6,d1
  352.             beq.s    SkipWrite
  353.             move.l    a0,d2
  354.             move.l    d0,d3
  355.             CALL    Write
  356. SkipWrite        Pull    d0-d4/a0-a1/a6
  357.             rts
  358.  
  359.             ;MainPart: does the scrolling if necessary
  360.             ;Gets window in a0
  361. DoYourJob        RSave
  362.             move.l    a0,d0        ;No Window - let it be!
  363.             beq    LeaveIt
  364.             move.l    a0,a5
  365.  
  366.             move.l    wd_WScreen(a5),a0
  367.             move.l    a0,d0        ;Screen not valid? - let it be!
  368.             beq    LeaveIt
  369.             move.l    a0,a4
  370.             btst    #ArgWBOnly,ArgFlag
  371.             beq.s    NoMatter
  372.             move.w    sc_Flags(a4),d0
  373.             and.w    #$f,d0
  374.             cmp.w    #WBENCHSCREEN,d0
  375.             bne    LeaveIt
  376.  
  377. NoMatter        move.l    GfxBasis,a6        ;Get the visible size
  378.             lea    sc_ViewPort(a4),a0    ;of the screen to
  379.             CALL    GetVPModeID        ;determine when a window
  380.             move.l    d0,d2            ;is visible and when not
  381.             lea    DisplayInfer(pc),a1
  382.             move.l    #dim_SIZEOF,d0
  383.             move.l    #DTAG_DIMS,d1
  384.             sub.l    a0,a0
  385.             CALL    GetDisplayInfoData
  386.             lea    DisplayInfer(pc),a0
  387.             lea    dim_TxtOScan(a0),a0
  388.             move.w    ra_MaxX(a0),d0
  389.             sub.w    ra_MinX(a0),d0
  390.             addq    #1,d0
  391.             move.w    d0,VisualX
  392.  
  393.             move.w    ra_MaxY(a0),d0
  394.             sub.w    ra_MinY(a0),d0
  395.             addq    #1,d0
  396.             move.w    d0,VisualY
  397.  
  398.             move.l    a4,a0
  399.             move.l    IntBase,a6
  400.             btst    #ArgFront,ArgFlag    ;do we want screentofront?
  401.             bne.s    NoFront
  402.             CALL    ScreenToFront
  403.             bset    #SignalScreen,What    ;ScreenChange!
  404.  
  405. NoFront            move.l    wd_Flags(a5),d0
  406.             and.l    #WFLG_BACKDROP,d0
  407.             bne    LeaveIt        ;Not with backdrops!
  408.  
  409.             btst    #ArgWFront,ArgFlag
  410.             beq.s    NoFront2
  411.             move.l    a5,a0
  412.             move.l    wd_Flags(a0),d0
  413.             and.l    #WBENCHWINDOW,d0    ;does not work - but why?
  414.             bne.s    NoFront2
  415.             CALL    WindowToFront
  416.  
  417. NoFront2        btst    #ArgMove,ArgFlag
  418.             bne    LeaveIt
  419.             move.l    wd_WScreen(a5),a0    ;If the screen is smaller
  420.             move.w    sc_Width(a0),d0        ;that the visible size
  421.             cmp.w    VisualX,d0        ;in any way, we use the
  422.             bcc.s    NoMat1            ;original screen-size
  423.             move.w    sc_Width(a0),VisualX
  424. NoMat1            move.w    sc_Height(a0),d0
  425.             cmp.w    VisualY,d0
  426.             bcc.s    NoMat2
  427.             move.w    sc_Height(a0),VisualX
  428.             
  429.  
  430. NoMat2            moveq.l    #0,d7
  431.             moveq.l    #0,d6
  432.             moveq.l    #0,d0
  433.             moveq.l    #0,d2
  434.             move.w    wd_LeftEdge(a5),d0
  435.             add.w    wd_Width(a5),d0
  436.             move.w    sc_LeftEdge(a0),d2
  437.             neg.w    d2
  438.             add.w    VisualX,d2
  439.             sub.w    d0,d2
  440.             beq.s    SeemsOk2
  441.             bpl.s    SeemsOk
  442.             move.w    d2,d7        ;MOVEX!
  443.             ext.l    d7
  444. SeemsOk            move.w    wd_LeftEdge(a5),d0
  445.             move.w    sc_LeftEdge(a0),d2
  446.             neg.w    d2
  447.             sub.w    d2,d0
  448.             bne.s    TestAgain
  449.             moveq.l    #0,d7
  450. TestAgain        bpl.s    SeemsOk2
  451.             move.w    d0,d7        ;MOVEX!    - Prefer Leftedge
  452.             ext.l    d7
  453.             neg.l    d7
  454. SeemsOk2        move.w    wd_TopEdge(a5),d0
  455.             move.w    sc_TopEdge(a0),d2
  456.             neg.w    d2
  457.             sub.w    d2,d0
  458.             beq.s    SeemsOk4
  459.             bpl.s    SeemsOk3
  460.             move.w    d0,d6
  461.             ext.l    d6        ;MOVEY!
  462.             neg.l    d6
  463. SeemsOk3        move.w    wd_TopEdge(a5),d0
  464.             add.w    wd_Height(a5),d0
  465.             move.w    sc_TopEdge(a0),d2
  466.             neg.w    d2
  467.             add.w    VisualY,d2
  468.             sub.w    d0,d2
  469.             bne.s    TestAgain2
  470.             moveq.l    #0,d6
  471. TestAgain2        bpl.s    SeemsOk4
  472.             move.w    d2,d6        ;MOVEY! - Prefer bottom
  473.             ext.l    d6
  474. SeemsOk4        btst    #ArgAlways,ArgFlag
  475.             bne.s    DOOO
  476.             tst.l    d7
  477.             bne.s    DOOO
  478.             tst.l    d6
  479.             beq    LeaveIt
  480.  
  481. DOOO            move.l    d7,d0
  482.             btst    #ArgAlways,ArgFlag
  483.             bne.s    DoAlways1
  484.             tst.l    d0
  485.             beq.s    NoMoveAny1
  486. DoAlways1        cmp.b    #"c",SecondFlag
  487.             bne.s    NoCentering1
  488.  
  489.             moveq.l    #0,d0
  490.             move.w    wd_Width(a5),d0
  491.             lsr.w    #1,d0
  492.             add.w    wd_LeftEdge(a5),d0
  493.             moveq.l    #0,d2
  494.             move.w    VisualX,d2
  495.             lsr.w    #1,d2
  496.             move.w    sc_LeftEdge(a0),d3
  497.             neg.w    d3
  498.             add.w    d3,d2
  499.             sub.w    d0,d2
  500.             move.l    d2,d0
  501.             ext.l    d0
  502.             bra    NoMoveAny1
  503.             
  504. NoCentering1        cmp.b    #"l",SecondFlag
  505.             bne.s    RightAdj
  506.             moveq.l    #0,d0
  507.             move.w    wd_LeftEdge(a5),d0
  508.             add.w    sc_LeftEdge(a0),d0
  509.             neg.w    d0
  510.             ext.l    d0
  511.             bra.s    NoMoveAny1
  512.  
  513. RightAdj        cmp.b    #"r",SecondFlag
  514.             bne.s    NoMoveAny1
  515.             move.w    wd_LeftEdge(a5),d0
  516.             add.w    wd_Width(a5),d0
  517.             move.w    sc_LeftEdge(a0),d2
  518.             neg.w    d2
  519.             add.w    VisualX,d2
  520.             sub.w    d0,d2
  521.             move.l    d2,d0
  522.             ext.l    d0
  523.  
  524. NoMoveAny1        move.l    d6,d1
  525.             btst    #ArgAlways,ArgFlag
  526.             bne.s    DoAlways2
  527.             tst.l    d1
  528.             beq.s    NoMoveAny2
  529. DoAlways2        cmp.b    #"c",SecondFlag+1
  530.             bne.s    NoCentering2
  531.  
  532.             moveq.l    #0,d1
  533.             move.w    wd_Height(a5),d1
  534.             lsr.w    #1,d1
  535.             add.w    wd_TopEdge(a5),d1
  536.             moveq.l    #0,d2
  537.             move.w    VisualY,d2
  538.             lsr.w    #1,d2
  539.             move.w    sc_TopEdge(a0),d3
  540.             neg.w    d3
  541.             add.w    d3,d2
  542.             sub.w    d1,d2
  543.             move.l    d2,d1
  544.             ext.l    d1
  545.             bra    NoMoveAny2
  546.  
  547. NoCentering2        cmp.b    #"t",SecondFlag+1
  548.             bne.s    BotAdj
  549.             moveq.l    #0,d1
  550.             move.w    wd_TopEdge(a5),d1
  551.             add.w    sc_TopEdge(a0),d1
  552.             neg.w    d1
  553.             ext.l    d1
  554.             bra.s    NoMoveAny2
  555.  
  556. BotAdj            cmp.b    #"b",SecondFlag+1
  557.             bne.s    NoMoveAny2
  558.             move.w    wd_TopEdge(a5),d1
  559.             add.w    wd_Height(a5),d1
  560.             move.w    sc_TopEdge(a0),d2
  561.             neg.w    d2
  562.             add.w    VisualY,d2
  563.             sub.w    d1,d2
  564.             move.l    d2,d1
  565.             ext.l    d1
  566.  
  567. NoMoveAny2        CALL    MoveScreen
  568. LeaveIt            RLoad
  569.             rts
  570.  
  571.             ;ScreenID in a0
  572. AdjustScreen        RSave
  573.             btst    #ArgPDef,ArgFlag
  574.             beq.s    Skip_NoPub
  575.             bsr    GetPubFromID
  576.             move.l    a0,d0
  577.             beq.s    Skip_NoPub
  578.             move.l    IntBase,a6
  579.             CALL    SetDefaultPubScreen
  580. Skip_NoPub        RLoad
  581.             rts
  582.  
  583.             ;ScreenID in a0    ;Return a0=PubScreenName or Zero
  584. GetPubFromID        Push    d0/a3/a6
  585.             move.l    a0,a3
  586.             move.l    IntBase,a6
  587.             CALL    LockPubScreenList
  588.  
  589. CarryListOn        move.l    d0,a0
  590.             cmp.l    psn_Screen(a0),a3
  591.             beq.s    ScreenFound
  592.             move.l    LN_SUCC(a0),d0
  593.             bne.s    CarryListOn
  594.             sub.l    a0,a0
  595.             bra.s    ENDPS
  596.  
  597. ScreenFound        move.l    LN_NAME(a0),a0
  598. ENDPS            move.l    a0,-(sp)
  599.             CALL    UnlockPubScreenList
  600.             move.l    (sp)+,a0
  601.             Pull    d0/a3/a6
  602.             rts
  603.  
  604. Interrupt3        RSave
  605.             move.l    IntBase,a0
  606.             move.l    Active,d0
  607.             cmp.l    ib_ActiveWindow(a0),d0        ;New ActiveWindow?
  608.             beq.s    DoNothing
  609.             move.l    ib_ActiveWindow(a0),Active
  610.  
  611.             bsr    SignalMyself
  612.  
  613.             bset    #SignalWindow,What
  614.             
  615. DoNothing        move.l    IntBase,a0
  616.             move.l    FirstSc,d0
  617.             cmp.l    ib_FirstScreen(a0),d0        ;New FirstScreen?
  618.             beq.s    DoNothing2
  619.             move.l    ib_FirstScreen(a0),FirstSc
  620.  
  621.             bsr    SignalMyself
  622.  
  623.             bset    #SignalScreen,What
  624.  
  625. DoNothing2        RLoad
  626.             moveq.l    #0,d0
  627.             rts
  628.  
  629. SignalMyself        move.l  $04,a6
  630.             move.l  OwnTask,a1
  631.             move.l  Signal,d1        ;send a signal to move Screen
  632.             moveq.l    #0,d0
  633.             bset    d1,d0
  634.             CALL    Signal
  635.             rts
  636.  
  637.  
  638.             ;Space for displayinfo block
  639. DisplayInfer        ds.b    dim_SIZEOF
  640.  
  641. What            dc.w    0
  642. ArgFlag            dc.w    0
  643. SecondFlag        dc.w    0
  644. MyPort            dc.l    0
  645. IntBase            dc.l    0
  646. DosBase            dc.l    0
  647. IconBase        dc.l    0
  648. DObject            dc.l    0
  649. Active            dc.l    0
  650. FirstSc            dc.l    0
  651. GfxBasis        dc.l    0
  652. VisualX            dc.w    0
  653. VisualY            dc.w    0
  654. TemplateArray        ;
  655. TempHADJ        dc.l    0
  656. TempVADJ        dc.l    0
  657. TempNoFront        dc.l    0
  658. TempNoMove        dc.l    0
  659. TempAlways        dc.l    0
  660. TempWBOnly        dc.l    0
  661. TempWFront        dc.l    0
  662. TempPDef        dc.l    0
  663. TempQuit        dc.l    0
  664. OwnTask            dc.l    0
  665. Signal            dc.l    0
  666. Args            dc.l    0
  667. WBMessage        dc.l    0
  668. SignalMask        dc.l    SIGBREAKF_CTRL_C
  669. intuition        dc.b    "intuition.library",0
  670. DosName            dc.b    "dos.library",0
  671. GraphicsName        dc.b    "graphics.library",0
  672. IconName        dc.b    "icon.library",0
  673.  
  674.             even
  675. MyInterrupt        ds.b    IS_SIZE
  676.             even
  677.  
  678. WBTemplate    dc.l    TextHADJ,TempHADJ
  679.         dc.l    TextVADJ,TempVADJ
  680.         dc.l    TextNoFront,TempNoFront
  681.         dc.l    TextNoMove,TempNoMove
  682.         dc.l    TextAlways,TempAlways
  683.         dc.l    TextWBOnly,TempWBOnly
  684.         dc.l    TextWFront,TempWFront
  685.         dc.l    TextPDef,TempPDef
  686.         dc.l    TextQuit,TempQuit
  687.         dc.l    0
  688.  
  689. TextHADJ    dc.b    "HADJ",0
  690. TextVADJ    dc.b    "VADJ",0
  691. TextNoFront    dc.b    "NOFRONT",0
  692. TextNoMove    dc.b    "NOMOVE",0
  693. TextAlways    dc.b    "ALWAYS",0
  694. TextWBOnly    dc.b    "WBONLY",0
  695. TextWFront    dc.b    "WFRONT",0
  696. TextPDef    dc.b    "DEFPUB",0
  697. TextQuit    dc.b    "QUIT",0
  698. Template    dc.b    "HADJ/K,VADJ/K,NOFRONT/S,NOMOVE/S,ALWAYS/S,WBONLY/S,WFRONT/S,DEFPUB/S,QUIT/S",0
  699. PortName    dc.b    "Huntwindows1.4-Rendezvous",0
  700. HandlerName    dc.b    "Huntwindows1.4-Watcher",0
  701. Text1        dc.b    "Error in arguments!",$0a,0
  702. Text2        dc.b    "Error opening V36+ librarys!",$0a,0
  703. TextP        dc.b    "Huntwindows 1.4 - already installed, arguments passed.",$0a,0
  704.         dc.b    "$VER: "    ;for version information
  705. Texth        dc.b    "Huntwindows 1.4 (22.11.92) by Jörg Bublath",$0a,0
  706.         even
  707.